In a communication system there is often a need to perform measurements for determining the conditions and states of operation of the communication system. Measurements may be carried out for determining, for example, transmission delays between elements in a communication system and/or determining and adjusting the phase differences between clockworks of said elements. The communication system may be, for example, a geographically distributed communication network, the network elements of which represent the elements of said communication system. Said network elements may be, for example, routers, switches, hubs or base stations of a mobile communication network. Said communication system may also be a single device, such as a communication device in the operator's equipment room, which consists of units connected to each other by communication connections, which units in this case represent the elements of the communication system.
In order to illustrate the background of the invention, two areas of the communication system will be examined, each of which may represent a certain device of the communication system or an entity consisting of one or more devices. For example, let us assume that the first measurement message is sent from area 1 to area 2 at an instant when the clock time measured in area 1 is tTX1. Said first measurement message is received in area 2 at an instant when the clock time measured in area 2 is tRX2. The difference tRX2−tTX1 contains two components, which are the phase difference Ψ1 between the clock times of areas 1 and 2 at the instant of transmission of said first measurement message and the transmission delay D1 of said first measurement message from area 1 to area 2. In other words, tRX2−tTX1=Ψ1+D1. In the equation shown above, the transmission delay D1 is assumed to be indicated as a change of the clock time measured in area 2. For example, let us assume that a second measurement message is sent from area 2 to area 1 at an instant when the clock time measured in area 2 is tTX2. Said second measurement message is received in area 1 at an instant when the clock time measured in area 1 is tRX1. The difference tRX1−tTX2 contains two components, which are the phase difference Ψ2 between the clock times of areas 2 and 1 at the instant of transmission of said second measurement message, and the transmission delay D2 of said second measurement message from area 2 to area 1. In other words, tRX1−tTX2=Ψ2+D2. In the equation shown above, the transmission delay D2 is assumed to be indicated as a change of the clock time measured in area 1. If the transmission delays D1 ja D2 are equal (D1=D2) and the phase difference between the clock times of areas 1 and 2 does not change during the time between the instants of transmission of said measurement messages (Ψ1=−Ψ2), the phase difference between the clock times of areas 1 and 2 can be calculated as follows:
                              Ψ          =                                                    (                                                      t                                          RX                      ⁢                                                                                          ⁢                      2                                                        -                                      t                                          TX                      ⁢                                                                                          ⁢                      1                                                                      )                            -                              (                                                      t                                          RX                      ⁢                                                                                          ⁢                      1                                                        -                                      t                                          TX                      ⁢                                                                                          ⁢                      2                                                                      )                                      2                          ,                            (        1        )            where Ψ=Ψ1=−Ψ2. The determined phase difference between the clock times can be used for adjusting the operation of the clockworks of the communication system. With these assumptions, the data transmission delay between areas 1 and 2 can be calculated as follows:
                              D          =                                                    t                                  RX                  ⁢                                                                          ⁢                  2                                            -                              t                                  TX                  ⁢                                                                          ⁢                  1                                            +                              t                                  RX                  ⁢                                                                          ⁢                  1                                            -                              t                                  TX                  ⁢                                                                          ⁢                  2                                                      2                          ,                            (        2        )            where D=D1=D2. A solution according to the example shown above has been described, for example, in the technical specification IEEE1588v2 (Institute of Electrical and Electronics Engineers).
In frame switched communication systems, the measurement messages mentioned above are transferred as frames which can be, for example, IP (Internet Protocol) packages, ATM (Asynchronous Transfer Mode) frames, Ethernet frames, MPLS (Multiprotocol Label Switching) frames, Frame Relay frames or frames of some other data transfer protocol. As described above, the calculation of the phase difference of the clock times by equation (1) is based on the assumptions that the phase difference of the clock times measured in different areas does not change during the time between the instants of transmission of the measurement messages and that the transmission delays in different directions are equal. Modern clockworks are generally of so high a quality that the assumption concerning the phase difference between the clock times is generally substantially accurate. In frame switched communication systems, however, the assumption concerning the transmission delay is often not accurate enough, because the transmission delay includes a significant random-type part, and the data transfer paths routed to opposite transfer directions may be of different length. Said random-type part is, among other things, due to the queuing delays experienced by the data transmission frames in the transmission buffers and/or reception buffers of the network elements.
Publications EP 1455473 A2 and WO 2005/020486 A1 disclose a solution in which measurement and adjustment are performed only on the basis of the information represented by measurement messages that had the smallest observed transmission delay. Each measurement message that had the smallest observed transmission delay is selected from among the measurement messages received during a period of observation of a predetermined length. When the communication network is under a light load, the measurement messages that had the smallest observed transmission delay have not had to queue a significant amount of time in the transmission buffers and/or reception buffers of the network elements. In other words, said transmission buffers and/or reception buffers have been empty or nearly empty when the measurement messages that had the smallest observed transmission delay have arrived in the buffers. Therefore, the solution can be used to reduce the interfering influence of random-type queuing delays on measurement and adjustment. The more heavily loaded the communication network is, the more rare are the situations in which the transmission buffers and/or reception buffers of the network element are empty or nearly empty. When the load on the communication network increases, the smallest transmission delay of a measurement message that occurs during an observation period of a fixed length, more and more rarely is such a transmission delay that does not contain a random-type queuing delay.
In the example related to the equations (1) and (2) shown above, both the first measurement message and the second measurement message must be among the measurement messages that experienced as small a transmission delay as possible. For the purpose that the first measurement message would represent a measurement message that experienced a sufficiently small transmission delay, it is often necessary to transmit a large number of measurement messages and to select the measurement message for which the difference between the instants of reception and transmission is the smallest as the first measurement message. Similarly, for the purpose that the second measurement message would represent a measurement message that experienced a sufficiently small transmission delay, it is often necessary to transmit a large number of measurement messages and to select the measurement message for which the difference between the instants of reception and transmission is the smallest as the second measurement message. The large number of measurement messages required makes the measurement and possible adjustment based on the measurement slow and also stresses the communication system. On the other hand, compromising on the number of measurement messages reduces the accuracy of the measurement and possible adjustment based on it.